﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DbProfiler.DatabaseAccess.SchemaExtraction
{
    public abstract class SchemaExtractorFactory
    {
        public static ISchemaExtractor GetSchemaExtractor(Database database)
        {
            // Create a new schema extractor based on the database type.
            ISchemaExtractor schemaExtractor = null;
            switch (database.DatabaseType)
            {
                case DatabaseType.MsftSqlServer2005:
                    schemaExtractor = new MsftSqlSchemaExtractor();
                    break;
            }

            // Assign the database definition and return the schema extractor.
            schemaExtractor.Database = database;
            return schemaExtractor;
        }
    }
}
